package org.jgs1904.pojo;

import org.springframework.stereotype.Component;

/**
 * @author: 默苍璃
 * @date: 2022-01-03 14:41
 * @Component 将这个类标注为Spring的一个组件，放到容器中！
 */
@Component
public class Dog {

    public String name = "哈士奇";

    public void setName(String name) {
        this.name = name;
    }

    public void init() {
        System.out.println("初始化");
    }

    public void destroy() {
        System.out.println("销毁");
    }
}
